#pragma once

#include<iostream>
#include<vector>
using namespace std;

template<size_t N>
class bitset
{
public:
	bitset()
	{
		_bit.resize(N / 32 + 1);
	}

	void set(size_t val)
	{
		size_t i = val / 32;
		size_t j = val % 32;

		_bit[i] |= (1 << j);
	}

	void reset(size_t val)
	{
		size_t i = val / 32;
		size_t j = val % 32;

		_bit[i] &= (~(1 << j));
	}

	bool test(size_t val)
	{
		size_t i = val / 32;
		size_t j = val % 32;

		return _bit[i] & (1 << j);
	}

private:
	vector<size_t> _bit;
};